package com.briup.day3;

import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            int a = in.nextInt();
            int count = 0;
            int i = 0;
            int num = a;
            while(num != 0) {
                if((num & 1) == 1) {
                    count++;
                }
                num = num >> 1;
                i++;
            }
            System.out.println(count);
        }
    }
}
